<?php

class Talktangle_Form_Talktangle_View extends Engine_Form
{
  public function init()
  {
      $this->clearDecorators()
//      ->addDecorator('FormElements')
//      ->addDecorator('Form')
      ->setAction(Zend_Controller_Front::getInstance()->getRouter()->assemble(array()));

        $this->setTitle('Talktangle');
               
        $this->addElement('textarea','content',array(
            'label'=>'Answer',
			'required' =>true,
            'allowEmtry'=>false,
            'validators' => array (
					array (
						'NotEmpty', 
						true
					)
			)                                             
        ));
              
       $this->addElement('Hidden', 'title', array('order' => 100));     
       
       $this->addElement('Button', 'untangle', array (
			'label' => 'Untangle', 
            'onclick' => 'unTangle();',
			'decorators' => array (
				'ViewHelper',
                'DivDivDivWrapper',
			)
		));    
             
       $this->addElement('Button', 'submit', array (
			'label' => 'Submit', 
			'type' => 'submit',
			'decorators' => array (
				'ViewHelper'
			)
		)); 
       
		$this->addElement('Cancel', 'cancel', array (
				'label' => 'cancel', 
				'link' => true, 
				'href' => '', 
                'onclick' => 'cancelUntangle();',
				'decorators' => array (
						'ViewHelper'
				)
		));               

        $this->addDisplayGroup(array('submit', 'cancel'), 'buttons', array(
          'decorators' => array(
            'FormElements',
            'DivDivDivWrapper',
          ),
        ));           
  }
}  